package jp.co.piratealliance.pirateAllianceWeb.web.tag;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import jp.co.piratealliance.pirateAllianceWeb.web.tag.component.SysImageComponent;

import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.ComponentTagSupport;

import com.opensymphony.xwork2.util.ValueStack;

/**
 * copyright   pirate alliance team 2014
 * @author     xuwei
 *
 */
public class SysImageTag extends ComponentTagSupport
{
	/**
	 *
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 图像路径
	 */
	private String imagePath;

	private String width;

	private String height;

	@Override
	public Component getBean(ValueStack arg0, HttpServletRequest arg1,
			HttpServletResponse arg2)
	{
		SysImageComponent component = new SysImageComponent(arg0);
		component.setImagePath(imagePath);
		component.setWidth(width);
		component.setHeight(height);
		return component;
	}

	public String getImagePath()
	{
		return imagePath;
	}

	public void setImagePath(String imagePath)
	{
		this.imagePath = imagePath;
	}

	/**
	 * @return the width
	 */
	public String getWidth()
	{
		return width;
	}

	/**
	 * @param width the width to set
	 */
	public void setWidth(String width)
	{
		this.width = width;
	}

	/**
	 * @return the height
	 */
	public String getHeight()
	{
		return height;
	}

	/**
	 * @param height the height to set
	 */
	public void setHeight(String height)
	{
		this.height = height;
	}

}
